<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      "use strict";
      function Info() {
        // let this = {}; //脑补
        this.name = "jack";
        this.age = 20;
        this.say = function () {
          console.log(this.name);
        };
        // return this; //自动加上
      }
      const p = new Info(); //p=this
      console.log(p.name);
      console.log(p.age);
      p.say();
    </script>
  </body>
</html>
